#ifndef BASESHADER_H
#define BASESHADER_H

#include <QOpenGLShaderProgram>
#include <QOpenGLExtraFunctions>

#define BUFFER_OFFSET(offset) ((void*) (offset))

class BaseShader : public QObject, protected QOpenGLExtraFunctions
{
    Q_OBJECT
public:
    BaseShader(QObject *parent = Q_NULLPTR);
    virtual void initializeGL();
    virtual void paintGL();

    //着色器程序
    QOpenGLShaderProgram* m_program;

    QString m_file_vert;
    QString m_file_frag;
};

#endif // BASESHADER_H
